package cn.ctodb.mall.goods.action;

import cn.ctodb.mall.goods.client.Config;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.annotation.Resource;

/**
 * Created by cc on 2017/4/5.
 */
@Controller
public class IndexAction {

    @Resource
    private Config config;

    @GetMapping("/")
    public String index() {
        System.out.print(config.get("base", "hostname"));
        return "index";
    }

    @GetMapping("category/{code}")
    public String category(@PathVariable("code") String code) {
        return "category";
    }

}
